package com.factory.iamp.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LinePermission {
    private int lid;
    private String uid;
    private int r;
    private int w;
    private int a;

    public boolean checkPermission(String type) {
        if(type.equals("r")) return r != 0;
        if(type.equals("w")) return w != 0;
        if(type.equals("a")) return a != 0;
        return false;
    }
}
